home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 034a / scrbdr3w.zip / COMBINED.PTS next >
Text File  |  1992-02-16  |  1KB  |  42 lines

  1. Since so many of you have requested that I let you in on how I arrive at
  2. Combined Points in the TopTen Winners Bulletin, I am enclosing the
  3. procedure that I use to determine the point values.  It is all pretty
  4. self-explanatory (even for the non-programmers), so I won't elaborate
  5. further.
  6.  
  7.   FUNCTION GetTotal(Game : GameRecord; x : byte) : integer;
  8.   VAR
  9.     Score : integer;
  10.   BEGIN
  11.     Score := 0;
  12.     CASE Game.Players[x].Score OF           {All Players Get Points}
  13.       400..999 : Score := 7;                {Based on their Score  }
  14.       350..399 : Score := 6;
  15.       300..349 : Score := 5;
  16.       250..299 : Score := 4;
  17.       200..249 : Score := 3;
  18.       150..199 : Score := 2;
  19.       100..149 : Score := 1;
  20.     END;
  21.     IF Game.Players[x].Win THEN             {The Winner gets Extra Points}
  22.     BEGIN
  23.       CASE Game.Players[x].Moves OF         {based on number of moves,   }
  24.         0..5   : inc(Score, 6);
  25.         6..10  : inc(Score, 5);
  26.         11..15 : inc(Score, 4);
  27.         16..20 : inc(Score, 3);
  28.         21..25 : inc(Score, 2);
  29.         26..30 : inc(Score, 1);
  30.       END;
  31.       CASE Game.NoPlayers OF                {plus, number of players in game}
  32.         4 : inc(Score, 3);
  33.         3 : inc(Score, 2);
  34.         2 : inc(Score, 1);
  35.       END;
  36.     END;
  37.  
  38.     { Also - 5 EXTRA Points awarded for any BINGOS  - Any Player }
  39.  
  40.     GetTotal := Score;
  41.   END;
  42.